
replace	city=	49	if cbsafips==	10420	
replace	city=	46	if cbsafips==	10580
replace	city=	21	if cbsafips==	12060	
replace	city=	12	if cbsafips==	12580	
replace	city=	45	if cbsafips==	13820	

replace	city=	8	if cbsafips==	71650	
replace	city=	.	if cbsafips==	71650	& state==12

// ben's edits -- boston code change
replace city = 8 if cbsafips == 14460 & year > 2012
replace city = 8 if cbsafips == 14460 & state==12 & year > 2012


replace	city=	25	if cbsafips==	15380		
	
replace	city=	53	if cbsafips==	16980	& state==32

replace	city=	3	if cbsafips==	16980	& state==33



replace	city=	22	if cbsafips==	17140	
replace	city=	13	if cbsafips==	17460	
replace	city=	36	if cbsafips==	18140
replace	city=	17	if cbsafips==	19100	
replace	city=	28	if cbsafips==	19740			
replace	city=	28	if cbsafips==	14500

replace	city=	5	if cbsafips==	19820			
replace	city=	5	if cbsafips==	33780		
replace	city=	5	if cbsafips==	10300		
replace	city=	5	if cbsafips==	11460	
	
replace	city=	57	if cbsafips==	49180			
replace	city=	57	if cbsafips==	24660	
replace	city=	57	if cbsafips==	30540	
replace	city=	14	if cbsafips==	26420	
replace	city=	.	if cbsafips==	26420	& county==167
replace	city=	30	if cbsafips==	26900	
replace	city=	27	if cbsafips==	28140	
replace	city=	.	if cbsafips==	28140	& county==95	

replace	city=	26	if cbsafips==	33100	& county==86

replace	city=	20	if cbsafips==	33340	
replace	city=	16	if cbsafips==	33460	
replace	city=	.	if cbsafips==	33460	& state==35

replace	city=	32	if cbsafips==	35380	

replace	city=	23	if inlist(county,3,31) & state==22	
	
replace	city=	48	if cbsafips==	47260		
replace	city=	4	if cbsafips==	37980	
replace	city=	.	if cbsafips==	37980	& state==51
replace	city=	.	if cbsafips==	37980	& state==52

replace	city=	10	if cbsafips==	38300	
replace	city=	.	if cbsafips==	38300	& county==19
replace	city=	34	if cbsafips==	38900		
replace	city=	.	if cbsafips==	38900	& state==91

replace	city=	38	if cbsafips==	40380	
replace	city=	38	if cbsafips==	12860	
replace	city=	42	if cbsafips==	40900	
replace	city=	11	if cbsafips==	41180	
replace	city=	29	if cbsafips==	40140	
replace	city=	24	if cbsafips==	41740
replace	city=	6	if cbsafips==	41860

*replace city=	31 if state==93 & county==85

replace	city=	18	if cbsafips==	42660	
replace	city=	18	if cbsafips==	36020	
replace	city=	.	if cbsafips==	42660	& county==53


replace	city=	33	if cbsafips==	45300	

replace	city=	7	if cbsafips==	47900			
replace city=	7	if cbsafips==	25180	& state==55
replace city=	.	if city==7	& state==55

replace	city=	9	if inlist(county,59,103) & state==21
replace	city=	19	if cbsafips==	31100	
replace	city=	2	if cbsafips==	31100 & county==37

// ben's edits -- los angeles cbsafips change
replace	city=	19	if cbsafips==	31080	& year > 2012
replace	city=	2	if cbsafips==	31080 & county==37  & year > 2012 

// ben's edis -- san jose -- no county codes
*replace city = 31 if cbsafips == 41940

replace	city=	1	if cbsafips==35620	&  state==21 & city==.


replace city=	15			if stfips==	34	& county==	13
replace city=	15			if stfips==	34	& county==	27
replace city=	15			if stfips==	34	& county==	37
replace city=	15			if stfips==	34	& county==	39
replace city=	15			if stfips==	34	& county==	41

// New Jersey problematic for cbsa
replace city=. if state==22 & city!=4
